package cn.juque.systemservice.api.dto.dict;

import cn.juque.common.abstracts.AbstractRequestDTO;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author JUQUE
 * @version 1.0.0
 * <li></li>
 * @date 2022-10-27 10:54:47
 **/
@Data
public class DictInfoUpdateDTO extends AbstractRequestDTO {

    /**
     * 代码信息ID
     */
    @NotEmpty(message = "代码信息ID不能为空")
    @Size(message = "代码信息ID不能超过{max}个字符", max = 32)
    private String dictId;

    /**
     * 代码类别ID
     */
    @NotEmpty(message = "代码类别ID不能为空")
    @Size(message = "代码类别ID不能超过{max}个字符", max = 32)
    private String dictCode;

    /**
     * 代码类别
     */
    @NotEmpty(message = "代码类别不能为空")
    @Size(message = "代码类别不能超过{max}个字符", max = 32)
    private String dictType;

    /**
     * 名称
     */
    @NotEmpty(message = "名称不能为空")
    @Size(message = "名称不能超过{max}个字符", max = 100)
    private String dictName;

    /**
     * 上级联动下拉框值
     */
    @Size(message = "上级联动下拉框值不能超过{max}个字符", max = 100)
    private String parentDictCode;

    /**
     * 排序号
     */
    @NotNull(message = "排序号不能为空")
    @Range(min = 0, max = 9999, message = "排序号必须在{min}-{max}之间")
    private Integer sortNo;

    /**
     * 备注
     */
    @Size(message = "备注不能超过{max}个字符", max = 400)
    private String remark;

}
